{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "* 记录人 ：陈蔚"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "* 备注\n",
    "> 1. 城市：'全国'、 '北京、 '上海'、 '天津'、 '重庆'、 '广州'、'深圳'、 '苏州'、 '南京'、 '杭州'、 '大连'、'成都'、 '武汉'、 '西安'\n",
    "> 2. 关键词：不限制\n",
    "> 3. 工作经验：'应届生'、 '实习生'、 '1年以内'、 '1-3年'、'3-5年'、 '5-10年'、'10年以上'\n",
    "> 4. 公司规模：1-49人、50-99人、100-499人、500-999人、1000-2000人、2000-5000人、5000-10000人、10000人以上"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "登录cookie XSRF-TOKEN=zIARnRM0QQaLudJk_4OBXw; __gc_id=e936feed5bd343e5a73b304fa0d4ad5f; _ga=GA1.1.504776059.1697021947; __uuid=1697021948310.51; __tlog=1697021948354.48%7C00000000%7C00000000%7C00000000%7C00000000; Hm_lvt_a2647413544f5a04f00da7eee0d5e200=1697021951; acw_tc=2760828416970219810274366e53a098388abcfc886c89f5cbf2332344893f; Hm_lpvt_a2647413544f5a04f00da7eee0d5e200=1697021975; __session_seq=4; __uv_seq=4; __tlg_event_seq=24; _ga_54YTJKWN86=GS1.1.1697021946.1.1.1697023027.0.0.0\n",
      "这是第1页，接下来将先等待7秒...然后以继续抓取\n",
      "这是第2页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第3页，接下来将先等待7秒...然后以继续抓取\n",
      "这是第4页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第5页，接下来将先等待9秒...然后以继续抓取\n",
      "这是第6页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第7页，接下来将先等待5秒...然后以继续抓取\n",
      "这是第8页，接下来将先等待7秒...然后以继续抓取\n",
      "这是第9页，接下来将先等待10秒...然后以继续抓取\n",
      "这是第10页，接下来将先等待3秒...然后以继续抓取\n"
     ]
    },
    {
     "data": {
      "text/plain": "                                           dataParams  \\\n0   {\"jobId\":\"48818805\",\"recruiterName\":\"吴先生\",\"use...   \n1   {\"jobId\":\"61288827\",\"recruiterName\":\"程女士\",\"use...   \n2   {\"jobId\":\"59083047\",\"recruiterName\":\"江女士\",\"use...   \n3   {\"jobId\":\"60207589\",\"recruiterName\":\"彭先生\",\"use...   \n4   {\"jobId\":\"53884129\",\"recruiterName\":\"刘女士\",\"use...   \n..                                                ...   \n35  {\"jobId\":\"33273225\",\"recruiterName\":\"陈先生\",\"use...   \n36  {\"jobId\":\"47789029\",\"recruiterName\":\"罗女士\",\"use...   \n37  {\"jobId\":\"47139309\",\"recruiterName\":\"汪女士\",\"use...   \n38  {\"jobId\":\"23174441\",\"recruiterName\":\"付先生\",\"use...   \n39  {\"jobId\":\"49947443\",\"recruiterName\":\"童女士\",\"use...   \n\n                                             dataInfo  \\\n0   %7B%22jobId%22%3A%2248818805%22%2C%22ckId%22%3...   \n1   %7B%22jobId%22%3A%2261288827%22%2C%22ckId%22%3...   \n2   %7B%22jobId%22%3A%2259083047%22%2C%22ckId%22%3...   \n3   %7B%22jobId%22%3A%2260207589%22%2C%22ckId%22%3...   \n4   %7B%22jobId%22%3A%2253884129%22%2C%22ckId%22%3...   \n..                                                ...   \n35  %7B%22jobId%22%3A%2233273225%22%2C%22ckId%22%3...   \n36  %7B%22jobId%22%3A%2247789029%22%2C%22ckId%22%3...   \n37  %7B%22jobId%22%3A%2247139309%22%2C%22ckId%22%3...   \n38  %7B%22jobId%22%3A%2223174441%22%2C%22ckId%22%3...   \n39  %7B%22jobId%22%3A%2249947443%22%2C%22ckId%22%3...   \n\n                                           job.labels job.jobId  \\\n0                                        [渠道运营, 产品运营]  48818805   \n1                                                  []  61288827   \n2   [工具产品, 数据产品, 策略产品, 用户研究, 团队管理, 数据分析, 需求分析, 竞品分...  59083047   \n3                      [策略产品, 产品优化, 团队管理, 用户研究, 数据分析]  60207589   \n4    [策略产品, to G, 竞品分析, 产品规划, 用户研究, 产品设计, 数据分析, 团队管理]  53884129   \n..                                                ...       ...   \n35                                             [生产跟单]  33273225   \n36                                                 []  47789029   \n37               [网络销售, 电话销售, to C, 销售管理, 客户管理, 团队管理]  47139309   \n38                                                 []  23174441   \n39                                             [销售助理]  49947443   \n\n                     job.title  job.advViewFlag job.requireWorkYears  \\\n0                  PM产品经理（元器件）            False                 经验不限   \n1   TV Product Manager(南非、意大利)            False                 经验不限   \n2                      产品经理实习生            False                 经验不限   \n3              AIGC 企业级应用的产品经理            False                 经验不限   \n4                      产品经理-德语            False                 经验不限   \n..                         ...              ...                  ...   \n35                        生产跟单            False                 经验不限   \n36                       管理培训生            False                 经验不限   \n37                        网络销售            False                 经验不限   \n38                     产品专员/助理            False                 经验不限   \n39                        销售助理            False                 经验不限   \n\n   job.refreshTime job.jobKind  job.salary  ... recruiter.imUserType  \\\n0   20220411230440           2  15-20k·13薪  ...                    2   \n1   20230831194617           2  15-35k·14薪  ...                    2   \n2   20230605144027           2       8-13k  ...                    2   \n3   20230722084816           2      20-50k  ...                    2   \n4   20221114134406           2       9-14k  ...                    2   \n..             ...         ...         ...  ...                  ...   \n35  20201107085717           2        5-9k  ...                    2   \n36  20220701093709           2        4-8k  ...                    2   \n37  20220216173703           2       9-13k  ...                    2   \n38  20191012125151           2       8-12k  ...                    2   \n39  20220817085500           2    4-7k·13薪  ...                    2   \n\n               recruiter.recruiterId         recruiter.recruiterPhoto  \\\n0   09ea96f81e58eafe6ac4e705fd2725a1  5f8f986bdfb13a7dee342f2108u.jpg   \n1   4898c453f67450440d4d8cf16bd118f5  5f8f9863f6d1ab58476f246a08u.jpg   \n2   975590973597d5990df38e310c892c5e  6482ad4ca582421b523f6aad02u.png   \n3   b9f5503a38d756eea51fcf4dc008bfd3  644ed8b14bbdfd19cd96b38d07u.png   \n4   1ea5a9e8f72f55d8b9b943c2bbffc50b  636b0ca57f270e6a8bfd39c301u.png   \n..                               ...                              ...   \n35  0895e5f5ea2f23c73d9184460a4c74d3  5f8f98698dbe6273dcf8516008u.jpg   \n36  0cb8121bf5405885d431a8234a355eca  6225a01d81a14b00fe47233b03u.png   \n37  88570e71c3ade619b3047ceb4c876b7b  622f36db4a223b009c6c4efe05u.png   \n38  5527f903ad0f2f1a319538072cd912fa  5f8f986aea60860b75384fab08u.jpg   \n39  7ea036c02a53ddf1deeca2a9ecc4662b  5f8f9865ea60860b75384fa508u.jpg   \n\n    comp.compName comp.compScale comp.compStage  \\\n0      厦门唯样科技有限公司         50-99人          融资未公开   \n1        创维-RGB电子       10000人以上            NaN   \n2      深圳汉阳科技有限公司         50-99人            天使轮   \n3   深圳市迷谷启明科技有限公司          1-49人            NaN   \n4      广州疆海科技有限公司       100-499人             A轮   \n..            ...            ...            ...   \n35   深圳市诚伟翔科技有限公司          1-49人            NaN   \n36            大管加       100-499人            天使轮   \n37  深圳市洋葱电子商务有限公司       500-999人             B轮   \n38   深圳时资科技发展有限公司          1-49人            NaN   \n39  深圳市欣妍生物技术有限公司          1-49人          融资未公开   \n\n                      comp.compLogo comp.compIndustry comp.compId  \\\n0   5c6e1794261c45f047888e8e04u.png       电子/半导体/集成电路     9885213   \n1   5bfe96db74719df0ac991c0e03a.png       电子/半导体/集成电路     1550812   \n2   638030fd790f213180984f4401u.png              人工智能     8809483   \n3   61b07937d0458d53c627567e02u.jpg               互联网    13341083   \n4   648a8cab5446774f442f54e103u.png       电子/半导体/集成电路     9998763   \n..                              ...               ...         ...   \n35  61b07937d0458d53c627567e02u.jpg              金属制品    12443347   \n36  5e3d1aa96324626e179ace0101u.jpg             计算机软件     9238896   \n37  5e23ab5629d83a675442873a06u.png               互联网    10074973   \n38  5bfe9f9f74719d2aa34bce5e03a.png           电气机械/器材     7891695   \n39  61b07937d0458d53c627567e02u.jpg                制药    13225483   \n\n                                   comp.link  \n0    https://www.liepin.com/company/9885213/  \n1    https://www.liepin.com/company/1550812/  \n2    https://www.liepin.com/company/8809483/  \n3   https://www.liepin.com/company/13341083/  \n4    https://www.liepin.com/company/9998763/  \n..                                       ...  \n35  https://www.liepin.com/company/12443347/  \n36   https://www.liepin.com/company/9238896/  \n37  https://www.liepin.com/company/10074973/  \n38   https://www.liepin.com/company/7891695/  \n39  https://www.liepin.com/company/13225483/  \n\n[400 rows x 31 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>dataParams</th>\n      <th>dataInfo</th>\n      <th>job.labels</th>\n      <th>job.jobId</th>\n      <th>job.title</th>\n      <th>job.advViewFlag</th>\n      <th>job.requireWorkYears</th>\n      <th>job.refreshTime</th>\n      <th>job.jobKind</th>\n      <th>job.salary</th>\n      <th>...</th>\n      <th>recruiter.imUserType</th>\n      <th>recruiter.recruiterId</th>\n      <th>recruiter.recruiterPhoto</th>\n      <th>comp.compName</th>\n      <th>comp.compScale</th>\n      <th>comp.compStage</th>\n      <th>comp.compLogo</th>\n      <th>comp.compIndustry</th>\n      <th>comp.compId</th>\n      <th>comp.link</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>{\"jobId\":\"48818805\",\"recruiterName\":\"吴先生\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2248818805%22%2C%22ckId%22%3...</td>\n      <td>[渠道运营, 产品运营]</td>\n      <td>48818805</td>\n      <td>PM产品经理（元器件）</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20220411230440</td>\n      <td>2</td>\n      <td>15-20k·13薪</td>\n      <td>...</td>\n      <td>2</td>\n      <td>09ea96f81e58eafe6ac4e705fd2725a1</td>\n      <td>5f8f986bdfb13a7dee342f2108u.jpg</td>\n      <td>厦门唯样科技有限公司</td>\n      <td>50-99人</td>\n      <td>融资未公开</td>\n      <td>5c6e1794261c45f047888e8e04u.png</td>\n      <td>电子/半导体/集成电路</td>\n      <td>9885213</td>\n      <td>https://www.liepin.com/company/9885213/</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>{\"jobId\":\"61288827\",\"recruiterName\":\"程女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2261288827%22%2C%22ckId%22%3...</td>\n      <td>[]</td>\n      <td>61288827</td>\n      <td>TV Product Manager(南非、意大利)</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20230831194617</td>\n      <td>2</td>\n      <td>15-35k·14薪</td>\n      <td>...</td>\n      <td>2</td>\n      <td>4898c453f67450440d4d8cf16bd118f5</td>\n      <td>5f8f9863f6d1ab58476f246a08u.jpg</td>\n      <td>创维-RGB电子</td>\n      <td>10000人以上</td>\n      <td>NaN</td>\n      <td>5bfe96db74719df0ac991c0e03a.png</td>\n      <td>电子/半导体/集成电路</td>\n      <td>1550812</td>\n      <td>https://www.liepin.com/company/1550812/</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>{\"jobId\":\"59083047\",\"recruiterName\":\"江女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2259083047%22%2C%22ckId%22%3...</td>\n      <td>[工具产品, 数据产品, 策略产品, 用户研究, 团队管理, 数据分析, 需求分析, 竞品分...</td>\n      <td>59083047</td>\n      <td>产品经理实习生</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20230605144027</td>\n      <td>2</td>\n      <td>8-13k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>975590973597d5990df38e310c892c5e</td>\n      <td>6482ad4ca582421b523f6aad02u.png</td>\n      <td>深圳汉阳科技有限公司</td>\n      <td>50-99人</td>\n      <td>天使轮</td>\n      <td>638030fd790f213180984f4401u.png</td>\n      <td>人工智能</td>\n      <td>8809483</td>\n      <td>https://www.liepin.com/company/8809483/</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>{\"jobId\":\"60207589\",\"recruiterName\":\"彭先生\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2260207589%22%2C%22ckId%22%3...</td>\n      <td>[策略产品, 产品优化, 团队管理, 用户研究, 数据分析]</td>\n      <td>60207589</td>\n      <td>AIGC 企业级应用的产品经理</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20230722084816</td>\n      <td>2</td>\n      <td>20-50k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>b9f5503a38d756eea51fcf4dc008bfd3</td>\n      <td>644ed8b14bbdfd19cd96b38d07u.png</td>\n      <td>深圳市迷谷启明科技有限公司</td>\n      <td>1-49人</td>\n      <td>NaN</td>\n      <td>61b07937d0458d53c627567e02u.jpg</td>\n      <td>互联网</td>\n      <td>13341083</td>\n      <td>https://www.liepin.com/company/13341083/</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>{\"jobId\":\"53884129\",\"recruiterName\":\"刘女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2253884129%22%2C%22ckId%22%3...</td>\n      <td>[策略产品, to G, 竞品分析, 产品规划, 用户研究, 产品设计, 数据分析, 团队管理]</td>\n      <td>53884129</td>\n      <td>产品经理-德语</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20221114134406</td>\n      <td>2</td>\n      <td>9-14k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>1ea5a9e8f72f55d8b9b943c2bbffc50b</td>\n      <td>636b0ca57f270e6a8bfd39c301u.png</td>\n      <td>广州疆海科技有限公司</td>\n      <td>100-499人</td>\n      <td>A轮</td>\n      <td>648a8cab5446774f442f54e103u.png</td>\n      <td>电子/半导体/集成电路</td>\n      <td>9998763</td>\n      <td>https://www.liepin.com/company/9998763/</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>35</th>\n      <td>{\"jobId\":\"33273225\",\"recruiterName\":\"陈先生\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2233273225%22%2C%22ckId%22%3...</td>\n      <td>[生产跟单]</td>\n      <td>33273225</td>\n      <td>生产跟单</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20201107085717</td>\n      <td>2</td>\n      <td>5-9k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>0895e5f5ea2f23c73d9184460a4c74d3</td>\n      <td>5f8f98698dbe6273dcf8516008u.jpg</td>\n      <td>深圳市诚伟翔科技有限公司</td>\n      <td>1-49人</td>\n      <td>NaN</td>\n      <td>61b07937d0458d53c627567e02u.jpg</td>\n      <td>金属制品</td>\n      <td>12443347</td>\n      <td>https://www.liepin.com/company/12443347/</td>\n    </tr>\n    <tr>\n      <th>36</th>\n      <td>{\"jobId\":\"47789029\",\"recruiterName\":\"罗女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2247789029%22%2C%22ckId%22%3...</td>\n      <td>[]</td>\n      <td>47789029</td>\n      <td>管理培训生</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20220701093709</td>\n      <td>2</td>\n      <td>4-8k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>0cb8121bf5405885d431a8234a355eca</td>\n      <td>6225a01d81a14b00fe47233b03u.png</td>\n      <td>大管加</td>\n      <td>100-499人</td>\n      <td>天使轮</td>\n      <td>5e3d1aa96324626e179ace0101u.jpg</td>\n      <td>计算机软件</td>\n      <td>9238896</td>\n      <td>https://www.liepin.com/company/9238896/</td>\n    </tr>\n    <tr>\n      <th>37</th>\n      <td>{\"jobId\":\"47139309\",\"recruiterName\":\"汪女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2247139309%22%2C%22ckId%22%3...</td>\n      <td>[网络销售, 电话销售, to C, 销售管理, 客户管理, 团队管理]</td>\n      <td>47139309</td>\n      <td>网络销售</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20220216173703</td>\n      <td>2</td>\n      <td>9-13k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>88570e71c3ade619b3047ceb4c876b7b</td>\n      <td>622f36db4a223b009c6c4efe05u.png</td>\n      <td>深圳市洋葱电子商务有限公司</td>\n      <td>500-999人</td>\n      <td>B轮</td>\n      <td>5e23ab5629d83a675442873a06u.png</td>\n      <td>互联网</td>\n      <td>10074973</td>\n      <td>https://www.liepin.com/company/10074973/</td>\n    </tr>\n    <tr>\n      <th>38</th>\n      <td>{\"jobId\":\"23174441\",\"recruiterName\":\"付先生\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2223174441%22%2C%22ckId%22%3...</td>\n      <td>[]</td>\n      <td>23174441</td>\n      <td>产品专员/助理</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20191012125151</td>\n      <td>2</td>\n      <td>8-12k</td>\n      <td>...</td>\n      <td>2</td>\n      <td>5527f903ad0f2f1a319538072cd912fa</td>\n      <td>5f8f986aea60860b75384fab08u.jpg</td>\n      <td>深圳时资科技发展有限公司</td>\n      <td>1-49人</td>\n      <td>NaN</td>\n      <td>5bfe9f9f74719d2aa34bce5e03a.png</td>\n      <td>电气机械/器材</td>\n      <td>7891695</td>\n      <td>https://www.liepin.com/company/7891695/</td>\n    </tr>\n    <tr>\n      <th>39</th>\n      <td>{\"jobId\":\"49947443\",\"recruiterName\":\"童女士\",\"use...</td>\n      <td>%7B%22jobId%22%3A%2249947443%22%2C%22ckId%22%3...</td>\n      <td>[销售助理]</td>\n      <td>49947443</td>\n      <td>销售助理</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>20220817085500</td>\n      <td>2</td>\n      <td>4-7k·13薪</td>\n      <td>...</td>\n      <td>2</td>\n      <td>7ea036c02a53ddf1deeca2a9ecc4662b</td>\n      <td>5f8f9865ea60860b75384fa508u.jpg</td>\n      <td>深圳市欣妍生物技术有限公司</td>\n      <td>1-49人</td>\n      <td>融资未公开</td>\n      <td>61b07937d0458d53c627567e02u.jpg</td>\n      <td>制药</td>\n      <td>13225483</td>\n      <td>https://www.liepin.com/company/13225483/</td>\n    </tr>\n  </tbody>\n</table>\n<p>400 rows × 31 columns</p>\n</div>"
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import crawl_liepin\n",
    "\n",
    "crawl_liepin.crawl(城市=\"深圳\",关键词=\"产品经理\",工作经验='应届生')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. 第一个目标，cookies实现登陆，获取完整数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "'XSRF-TOKEN=oHAxxW7XT8aAsw6gusAjyA; __gc_id=df1924bef77640f6bbae10c27c562039; __uuid=1699442564475.93; acw_tc=2760828316994425645193908eb4aaa8692a1f8a91dfbc1400c75e246adff7; __tlog=1699442564480.42%7C00000000%7C00000000%7Cs_o_007%7Cs_o_007; __session_seq=2; __uv_seq=2; __tlg_event_seq=10'"
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 建立登陆cookie\n",
    "cookie = \"XSRF-TOKEN=oHAxxW7XT8aAsw6gusAjyA; __gc_id=df1924bef77640f6bbae10c27c562039; __uuid=1699442564475.93; acw_tc=2760828316994425645193908eb4aaa8692a1f8a91dfbc1400c75e246adff7; __tlog=1699442564480.42%7C00000000%7C00000000%7Cs_o_007%7Cs_o_007; __session_seq=2; __uv_seq=2; __tlg_event_seq=10\"\n",
    "cookie"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "登录cookie XSRF-TOKEN=oHAxxW7XT8aAsw6gusAjyA; __gc_id=df1924bef77640f6bbae10c27c562039; __uuid=1699442564475.93; acw_tc=2760828316994425645193908eb4aaa8692a1f8a91dfbc1400c75e246adff7; __tlog=1699442564480.42%7C00000000%7C00000000%7Cs_o_007%7Cs_o_007; __session_seq=2; __uv_seq=2; __tlg_event_seq=10\n",
      "这是第1页，接下来将先等待8秒...然后以继续抓取\n",
      "这是第2页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第3页，接下来将先等待3秒...然后以继续抓取\n",
      "这是第4页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第5页，接下来将先等待10秒...然后以继续抓取\n",
      "这是第6页，接下来将先等待7秒...然后以继续抓取\n",
      "这是第7页，接下来将先等待4秒...然后以继续抓取\n",
      "这是第8页，接下来将先等待9秒...然后以继续抓取\n",
      "这是第9页，接下来将先等待10秒...然后以继续抓取\n",
      "这是第10页，接下来将先等待7秒...然后以继续抓取\n"
     ]
    }
   ],
   "source": [
    "import crawl_liepin\n",
    "\n",
    "产品经理_深圳_results = crawl_liepin.crawl(城市=\"深圳\",关键词=\"产品经理\",工作经验='',登录cookie=cookie)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2. 尝试使用数据分析进行数据交互式可视化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": "                                           dataParams  \\\n0   {\"imId\":\"7d3fa6789cde5a1567766a03c68ce883\",\"im...   \n1   {\"imId\":\"3a4d6e5af4ea54c998d2351c2920e108\",\"im...   \n2   {\"imId\":\"ca94f48529c69593cf3b784bbdf4fe53\",\"im...   \n3   {\"imId\":\"4a4ece35206ffdf578f5885b11a76839\",\"im...   \n4   {\"imId\":\"5f8386ced4ae183262f6540bf442d9e7\",\"im...   \n..                                                ...   \n35  {\"imId\":\"58af556f02a9c1d637a1b37a5d2979c7\",\"im...   \n36  {\"imId\":\"c819e8883726ef7e8f669bb17ec3d8eb\",\"im...   \n37  {\"imId\":\"8bf63188cad28c2c68c56fcc9b2af6cb\",\"im...   \n38  {\"imId\":\"4a581524b589a252ff86eb5f1c63f723\",\"im...   \n39  {\"imId\":\"7c5495ab4c24aaa96bc971ec2e264ed1\",\"im...   \n\n                                             dataInfo  \\\n0   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n1   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n2   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n3   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n4   %7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...   \n..                                                ...   \n35  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n36  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n37  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n38  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n39  %7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...   \n\n                                           job.labels  \\\n0                           [工具产品, 计算机软件, 产品设计, 产品规划]   \n1    [数据产品, 工具产品, 化学化工, 数据分析, 产品规划, 数据挖掘, 用户研究, 产品设计]   \n2                   [策略产品, 能源/水利/环保, 新能源, 产品设计, 产品规划]   \n3                            [数据产品, 数据挖掘, 数据分析, 产品规划]   \n4   [数据产品, 供应链产品, 电子/半导体/集成电路, 电子商务, 产品规划, 用户研究, 市...   \n..                                                ...   \n35  [智能投顾产品经理, 投资产品, 金融产品, 金融行业, 移动端产品, 需求分析, 用户研究...   \n36                    [to B, IT互联网, 需求分析, 用户研究, 市场调研]   \n37                              [AI大模型产品经理, AI人工智能产品]   \n38  [金融产品, 交易产品, 风控产品, 策略产品, IT互联网, 金融行业, 用户研究, Ax...   \n39                               [OA产品, Axure, Xmind]   \n\n                                   job.title  job.dq job.jobKind  \\\n0                              【科技公司】BIM产品经理      深圳           2   \n1                            IT产品经理岗（数据开发方向）  深圳-南山区           2   \n2                              新能源产品经理（研发经验）  深圳-南山区           2   \n3   Lazada-Data Product Manager-流量数据产品经理（深圳）      深圳           2   \n4                               产品经理 PM（NXP）      深圳           2   \n..                                       ...     ...         ...   \n35                                高级智能投顾产品经理      深圳           1   \n36                 （储备）产品经理【20-22届-往届校招硕士专场】  深圳-福田区           2   \n37                                    高级产品经理  深圳-南山区           1   \n38                                    高级产品经理      深圳           1   \n39                                    OA产品经理  深圳-福田区           1   \n\n   job.refreshTime job.jobId  job.advViewFlag job.requireWorkYears  ...  \\\n0   20231103162049  60703563             True                5-10年  ...   \n1   20230724093847  60218903             True                5-10年  ...   \n2   20231108085807  62757747             True                5-10年  ...   \n3   20210311143004  36908035            False                5-10年  ...   \n4   20231016141158  44250585            False                5-10年  ...   \n..             ...       ...              ...                  ...  ...   \n35  20231107093631  50129455            False                5-10年  ...   \n36  20221215110638  55086205            False                 经验不限  ...   \n37  20230908093617  49249923            False                5-10年  ...   \n38  20230818172441  48734601            False                 3-5年  ...   \n39  20230814163016  48592999            False                5-10年  ...   \n\n   recruiter.recruiterTitle             recruiter.recruiterId  \\\n0                      招聘经理  3fcc5d5e7789cc2d15a835f0d3b0cd8e   \n1                        HR  682f5224fe72776cffa07540d5a21b09   \n2                    人力资源经理  a276f1c9428cbbd6482b32c71a5ef883   \n3                      招聘经理  d4be0c7af21e622076f4668dbe33f725   \n4                   人力资源部主管  03a35b280d00a67bde30689f01e9fe19   \n..                      ...                               ...   \n35                     猎头顾问  851f1364e956ebf8bfae1742a6c2db10   \n36                       HR  5101bdeab7487e5c1d0a1fdec36fba93   \n37                     猎头顾问  c8f33d34aac47f5be82800a1d8358940   \n38                     猎头顾问  4e29b99d4b63b58d7beae86c97c35549   \n39                     猎头顾问  faa10552e2b9a5c935d11993119cd022   \n\n           recruiter.recruiterPhoto comp.compId    comp.compName  \\\n0   5f8f986779c7cc70efbf36c008u.jpg   8008752.0             中海地产   \n1   5f8f9865ea60860b75384fa508u.jpg   9137518.0   前海兴邦金融租赁有限责任公司   \n2   5f8f9866dfb13a7dee342f1808u.jpg  13559807.0  中石油深圳新能源研究院有限公司   \n3   57c4e9d345ce9f0a74a9b8cd04a.png   1072424.0           阿里巴巴集团   \n4   5f8f9866dfb13a7dee342f1808u.jpg   8523053.0              中电港   \n..                              ...         ...              ...   \n35  5f9fbc80930a7616c5f26fa107u.jpg         NaN          知名互联网券商   \n36  5f8f986bdfb13a7dee342f2108u.jpg   8635284.0             嘉为科技   \n37  6312c4e3e09a8076a83a52d707u.png         NaN     某知名计算机软件上市公司   \n38  62cd222d387f9734984ccc9802u.png         NaN      某北京科技金融上市公司   \n39  62f083ccaa51704ed257569c01u.png         NaN     某深圳大型批发/零售公司   \n\n   comp.compScale                    comp.compLogo comp.compIndustry  \\\n0     5000-10000人  6152c4cc6f51835dc0c4098401u.png           房地产开发经营   \n1        100-499人  5950bce770320c7ee1a5511806a.jpg                银行   \n2        100-499人  65127c2197412100f7f75bc008u.png            专业技术服务   \n3        10000人以上  5bfe915474719d35745acf0903a.png               互联网   \n4        500-999人  5bfe9bce74719df0ac9a179703a.png       电子/半导体/集成电路   \n..            ...                              ...               ...   \n35    5000-10000人  60e2fe0bf3df194a3c48adb502u.png             计算机软件   \n36       500-999人  63b4d9f0a0380858a9711da306u.png              IT服务   \n37       10000人以上  60e2fe0bf3df194a3c48adb502u.png             计算机软件   \n38       100-499人  60e2fe0bf3df194a3c48adb502u.png              科技金融   \n39       10000人以上  60e2fe0bf3df194a3c48adb502u.png             批发/零售   \n\n                                   comp.link  comp.compStage  \n0    https://www.liepin.com/company/8008752/             NaN  \n1    https://www.liepin.com/company/9137518/             NaN  \n2   https://www.liepin.com/company/13559807/             NaN  \n3    https://www.liepin.com/company/1072424/            港股上市  \n4    https://www.liepin.com/company/8523053/             NaN  \n..                                       ...             ...  \n35                                                        其他  \n36   https://www.liepin.com/company/8635284/              B轮  \n37                                                       已上市  \n38                                                       已上市  \n39                                                     不需要融资  \n\n[400 rows x 31 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>dataParams</th>\n      <th>dataInfo</th>\n      <th>job.labels</th>\n      <th>job.title</th>\n      <th>job.dq</th>\n      <th>job.jobKind</th>\n      <th>job.refreshTime</th>\n      <th>job.jobId</th>\n      <th>job.advViewFlag</th>\n      <th>job.requireWorkYears</th>\n      <th>...</th>\n      <th>recruiter.recruiterTitle</th>\n      <th>recruiter.recruiterId</th>\n      <th>recruiter.recruiterPhoto</th>\n      <th>comp.compId</th>\n      <th>comp.compName</th>\n      <th>comp.compScale</th>\n      <th>comp.compLogo</th>\n      <th>comp.compIndustry</th>\n      <th>comp.link</th>\n      <th>comp.compStage</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>{\"imId\":\"7d3fa6789cde5a1567766a03c68ce883\",\"im...</td>\n      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n      <td>[工具产品, 计算机软件, 产品设计, 产品规划]</td>\n      <td>【科技公司】BIM产品经理</td>\n      <td>深圳</td>\n      <td>2</td>\n      <td>20231103162049</td>\n      <td>60703563</td>\n      <td>True</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>招聘经理</td>\n      <td>3fcc5d5e7789cc2d15a835f0d3b0cd8e</td>\n      <td>5f8f986779c7cc70efbf36c008u.jpg</td>\n      <td>8008752.0</td>\n      <td>中海地产</td>\n      <td>5000-10000人</td>\n      <td>6152c4cc6f51835dc0c4098401u.png</td>\n      <td>房地产开发经营</td>\n      <td>https://www.liepin.com/company/8008752/</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>{\"imId\":\"3a4d6e5af4ea54c998d2351c2920e108\",\"im...</td>\n      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n      <td>[数据产品, 工具产品, 化学化工, 数据分析, 产品规划, 数据挖掘, 用户研究, 产品设计]</td>\n      <td>IT产品经理岗（数据开发方向）</td>\n      <td>深圳-南山区</td>\n      <td>2</td>\n      <td>20230724093847</td>\n      <td>60218903</td>\n      <td>True</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>HR</td>\n      <td>682f5224fe72776cffa07540d5a21b09</td>\n      <td>5f8f9865ea60860b75384fa508u.jpg</td>\n      <td>9137518.0</td>\n      <td>前海兴邦金融租赁有限责任公司</td>\n      <td>100-499人</td>\n      <td>5950bce770320c7ee1a5511806a.jpg</td>\n      <td>银行</td>\n      <td>https://www.liepin.com/company/9137518/</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>{\"imId\":\"ca94f48529c69593cf3b784bbdf4fe53\",\"im...</td>\n      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n      <td>[策略产品, 能源/水利/环保, 新能源, 产品设计, 产品规划]</td>\n      <td>新能源产品经理（研发经验）</td>\n      <td>深圳-南山区</td>\n      <td>2</td>\n      <td>20231108085807</td>\n      <td>62757747</td>\n      <td>True</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>人力资源经理</td>\n      <td>a276f1c9428cbbd6482b32c71a5ef883</td>\n      <td>5f8f9866dfb13a7dee342f1808u.jpg</td>\n      <td>13559807.0</td>\n      <td>中石油深圳新能源研究院有限公司</td>\n      <td>100-499人</td>\n      <td>65127c2197412100f7f75bc008u.png</td>\n      <td>专业技术服务</td>\n      <td>https://www.liepin.com/company/13559807/</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>{\"imId\":\"4a4ece35206ffdf578f5885b11a76839\",\"im...</td>\n      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n      <td>[数据产品, 数据挖掘, 数据分析, 产品规划]</td>\n      <td>Lazada-Data Product Manager-流量数据产品经理（深圳）</td>\n      <td>深圳</td>\n      <td>2</td>\n      <td>20210311143004</td>\n      <td>36908035</td>\n      <td>False</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>招聘经理</td>\n      <td>d4be0c7af21e622076f4668dbe33f725</td>\n      <td>57c4e9d345ce9f0a74a9b8cd04a.png</td>\n      <td>1072424.0</td>\n      <td>阿里巴巴集团</td>\n      <td>10000人以上</td>\n      <td>5bfe915474719d35745acf0903a.png</td>\n      <td>互联网</td>\n      <td>https://www.liepin.com/company/1072424/</td>\n      <td>港股上市</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>{\"imId\":\"5f8386ced4ae183262f6540bf442d9e7\",\"im...</td>\n      <td>%7B%22sfrom%22%3A%22search_job_pc%22%2C%22jobK...</td>\n      <td>[数据产品, 供应链产品, 电子/半导体/集成电路, 电子商务, 产品规划, 用户研究, 市...</td>\n      <td>产品经理 PM（NXP）</td>\n      <td>深圳</td>\n      <td>2</td>\n      <td>20231016141158</td>\n      <td>44250585</td>\n      <td>False</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>人力资源部主管</td>\n      <td>03a35b280d00a67bde30689f01e9fe19</td>\n      <td>5f8f9866dfb13a7dee342f1808u.jpg</td>\n      <td>8523053.0</td>\n      <td>中电港</td>\n      <td>500-999人</td>\n      <td>5bfe9bce74719df0ac9a179703a.png</td>\n      <td>电子/半导体/集成电路</td>\n      <td>https://www.liepin.com/company/8523053/</td>\n      <td>NaN</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>35</th>\n      <td>{\"imId\":\"58af556f02a9c1d637a1b37a5d2979c7\",\"im...</td>\n      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n      <td>[智能投顾产品经理, 投资产品, 金融产品, 金融行业, 移动端产品, 需求分析, 用户研究...</td>\n      <td>高级智能投顾产品经理</td>\n      <td>深圳</td>\n      <td>1</td>\n      <td>20231107093631</td>\n      <td>50129455</td>\n      <td>False</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>猎头顾问</td>\n      <td>851f1364e956ebf8bfae1742a6c2db10</td>\n      <td>5f9fbc80930a7616c5f26fa107u.jpg</td>\n      <td>NaN</td>\n      <td>知名互联网券商</td>\n      <td>5000-10000人</td>\n      <td>60e2fe0bf3df194a3c48adb502u.png</td>\n      <td>计算机软件</td>\n      <td></td>\n      <td>其他</td>\n    </tr>\n    <tr>\n      <th>36</th>\n      <td>{\"imId\":\"c819e8883726ef7e8f669bb17ec3d8eb\",\"im...</td>\n      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n      <td>[to B, IT互联网, 需求分析, 用户研究, 市场调研]</td>\n      <td>（储备）产品经理【20-22届-往届校招硕士专场】</td>\n      <td>深圳-福田区</td>\n      <td>2</td>\n      <td>20221215110638</td>\n      <td>55086205</td>\n      <td>False</td>\n      <td>经验不限</td>\n      <td>...</td>\n      <td>HR</td>\n      <td>5101bdeab7487e5c1d0a1fdec36fba93</td>\n      <td>5f8f986bdfb13a7dee342f2108u.jpg</td>\n      <td>8635284.0</td>\n      <td>嘉为科技</td>\n      <td>500-999人</td>\n      <td>63b4d9f0a0380858a9711da306u.png</td>\n      <td>IT服务</td>\n      <td>https://www.liepin.com/company/8635284/</td>\n      <td>B轮</td>\n    </tr>\n    <tr>\n      <th>37</th>\n      <td>{\"imId\":\"8bf63188cad28c2c68c56fcc9b2af6cb\",\"im...</td>\n      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n      <td>[AI大模型产品经理, AI人工智能产品]</td>\n      <td>高级产品经理</td>\n      <td>深圳-南山区</td>\n      <td>1</td>\n      <td>20230908093617</td>\n      <td>49249923</td>\n      <td>False</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>猎头顾问</td>\n      <td>c8f33d34aac47f5be82800a1d8358940</td>\n      <td>6312c4e3e09a8076a83a52d707u.png</td>\n      <td>NaN</td>\n      <td>某知名计算机软件上市公司</td>\n      <td>10000人以上</td>\n      <td>60e2fe0bf3df194a3c48adb502u.png</td>\n      <td>计算机软件</td>\n      <td></td>\n      <td>已上市</td>\n    </tr>\n    <tr>\n      <th>38</th>\n      <td>{\"imId\":\"4a581524b589a252ff86eb5f1c63f723\",\"im...</td>\n      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n      <td>[金融产品, 交易产品, 风控产品, 策略产品, IT互联网, 金融行业, 用户研究, Ax...</td>\n      <td>高级产品经理</td>\n      <td>深圳</td>\n      <td>1</td>\n      <td>20230818172441</td>\n      <td>48734601</td>\n      <td>False</td>\n      <td>3-5年</td>\n      <td>...</td>\n      <td>猎头顾问</td>\n      <td>4e29b99d4b63b58d7beae86c97c35549</td>\n      <td>62cd222d387f9734984ccc9802u.png</td>\n      <td>NaN</td>\n      <td>某北京科技金融上市公司</td>\n      <td>100-499人</td>\n      <td>60e2fe0bf3df194a3c48adb502u.png</td>\n      <td>科技金融</td>\n      <td></td>\n      <td>已上市</td>\n    </tr>\n    <tr>\n      <th>39</th>\n      <td>{\"imId\":\"7c5495ab4c24aaa96bc971ec2e264ed1\",\"im...</td>\n      <td>%7B%22d_curPage%22%3A%229%22%2C%22d_pageSize%2...</td>\n      <td>[OA产品, Axure, Xmind]</td>\n      <td>OA产品经理</td>\n      <td>深圳-福田区</td>\n      <td>1</td>\n      <td>20230814163016</td>\n      <td>48592999</td>\n      <td>False</td>\n      <td>5-10年</td>\n      <td>...</td>\n      <td>猎头顾问</td>\n      <td>faa10552e2b9a5c935d11993119cd022</td>\n      <td>62f083ccaa51704ed257569c01u.png</td>\n      <td>NaN</td>\n      <td>某深圳大型批发/零售公司</td>\n      <td>10000人以上</td>\n      <td>60e2fe0bf3df194a3c48adb502u.png</td>\n      <td>批发/零售</td>\n      <td></td>\n      <td>不需要融资</td>\n    </tr>\n  </tbody>\n</table>\n<p>400 rows × 31 columns</p>\n</div>"
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "产品经理_深圳_results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "Index(['dataParams', 'dataInfo', 'job.labels', 'job.title', 'job.dq',\n       'job.jobKind', 'job.refreshTime', 'job.jobId', 'job.advViewFlag',\n       'job.requireWorkYears', 'job.requireEduLevel', 'job.topJob',\n       'job.salary', 'job.pcOuterLink', 'job.h5OuterLink', 'job.link',\n       'job.dataPromId', 'recruiter.imId', 'recruiter.imUserType',\n       'recruiter.chatted', 'recruiter.recruiterName',\n       'recruiter.recruiterTitle', 'recruiter.recruiterId',\n       'recruiter.recruiterPhoto', 'comp.compId', 'comp.compName',\n       'comp.compScale', 'comp.compLogo', 'comp.compIndustry', 'comp.link',\n       'comp.compStage'],\n      dtype='object')"
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "产品经理_深圳_results.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "job.dq\n深圳        126\n深圳-南山区    116\n深圳-福田区     53\n深圳-宝安区     38\n深圳-龙华区     35\n深圳-龙岗区     19\n深圳-罗湖区      4\n深圳-盐田区      4\n深圳-光明区      3\n深圳-坪山区      2\nName: count, dtype: int64"
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq = 产品经理_深圳_results['job.dq'].value_counts()\n",
    "series_dq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "outputs": [
    {
     "data": {
      "text/plain": "['深圳-南山区',\n '深圳-福田区',\n '深圳-宝安区',\n '深圳-龙华区',\n '深圳-龙岗区',\n '深圳-罗湖区',\n '深圳-盐田区',\n '深圳-光明区',\n '深圳-坪山区']"
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dq_name= [i for i in series_dq.index if '-' in i]\n",
    "dq_name"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "array([116,  53,  38,  35,  19,   4,   4,   3,   2], dtype=int64)"
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq[dq_name].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "['南山区', '福田区', '宝安区', '龙华区', '龙岗区', '罗湖区', '盐田区', '光明区', '坪山区']"
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[i.split('-')[1] for i in dq_name]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "[116, 53, 38, 35, 19, 4, 4, 3, 2]"
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series_dq[dq_name].values.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": "<pyecharts.render.display.HTML at 0x1f3b32132b0>",
      "text/html": "\n<script>\n    require.config({\n        paths: {\n            'echarts':'https://assets.pyecharts.org/assets/v5/echarts.min', '深圳':'https://assets.pyecharts.org/assets/v5/maps/guang3_dong1_shen1_zhen4'\n        }\n    });\n</script>\n\n        <div id=\"a21d699e7399430189675f32af5698f9\" style=\"width:900px; height:500px;\"></div>\n\n<script>\n        require(['echarts', '深圳'], function(echarts) {\n                var chart_a21d699e7399430189675f32af5698f9 = echarts.init(\n                    document.getElementById('a21d699e7399430189675f32af5698f9'), 'white', {renderer: 'canvas'});\n                var option_a21d699e7399430189675f32af5698f9 = {\n    \"animation\": true,\n    \"animationThreshold\": 2000,\n    \"animationDuration\": 1000,\n    \"animationEasing\": \"cubicOut\",\n    \"animationDelay\": 0,\n    \"animationDurationUpdate\": 300,\n    \"animationEasingUpdate\": \"cubicOut\",\n    \"animationDelayUpdate\": 0,\n    \"aria\": {\n        \"enabled\": false\n    },\n    \"color\": [\n        \"#5470c6\",\n        \"#91cc75\",\n        \"#fac858\",\n        \"#ee6666\",\n        \"#73c0de\",\n        \"#3ba272\",\n        \"#fc8452\",\n        \"#9a60b4\",\n        \"#ea7ccc\"\n    ],\n    \"series\": [\n        {\n            \"type\": \"map\",\n            \"name\": \"\\u4ea7\\u54c1\\u7ecf\\u7406\\u5730\\u533a\\u5206\\u5e03\",\n            \"label\": {\n                \"show\": true,\n                \"margin\": 8\n            },\n            \"map\": \"\\u6df1\\u5733\",\n            \"data\": [\n                {\n                    \"name\": \"\\u5357\\u5c71\\u533a\",\n                    \"value\": 116\n                },\n                {\n                    \"name\": \"\\u798f\\u7530\\u533a\",\n                    \"value\": 53\n                },\n                {\n                    \"name\": \"\\u5b9d\\u5b89\\u533a\",\n                    \"value\": 38\n                },\n                {\n                    \"name\": \"\\u9f99\\u534e\\u533a\",\n                    \"value\": 35\n                },\n                {\n                    \"name\": \"\\u9f99\\u5c97\\u533a\",\n                    \"value\": 19\n                },\n                {\n                    \"name\": \"\\u7f57\\u6e56\\u533a\",\n                    \"value\": 4\n                },\n                {\n                    \"name\": \"\\u76d0\\u7530\\u533a\",\n                    \"value\": 4\n                },\n                {\n                    \"name\": \"\\u5149\\u660e\\u533a\",\n                    \"value\": 3\n                },\n                {\n                    \"name\": \"\\u576a\\u5c71\\u533a\",\n                    \"value\": 2\n                }\n            ],\n            \"roam\": true,\n            \"aspectScale\": 0.75,\n            \"nameProperty\": \"name\",\n            \"selectedMode\": false,\n            \"zoom\": 1,\n            \"zlevel\": 0,\n            \"z\": 2,\n            \"seriesLayoutBy\": \"column\",\n            \"datasetIndex\": 0,\n            \"mapValueCalculation\": \"sum\",\n            \"showLegendSymbol\": true,\n            \"emphasis\": {}\n        }\n    ],\n    \"legend\": [\n        {\n            \"data\": [\n                \"\\u4ea7\\u54c1\\u7ecf\\u7406\\u5730\\u533a\\u5206\\u5e03\"\n            ],\n            \"selected\": {},\n            \"show\": true,\n            \"padding\": 5,\n            \"itemGap\": 10,\n            \"itemWidth\": 25,\n            \"itemHeight\": 14,\n            \"backgroundColor\": \"transparent\",\n            \"borderColor\": \"#ccc\",\n            \"borderWidth\": 1,\n            \"borderRadius\": 0,\n            \"pageButtonItemGap\": 5,\n            \"pageButtonPosition\": \"end\",\n            \"pageFormatter\": \"{current}/{total}\",\n            \"pageIconColor\": \"#2f4554\",\n            \"pageIconInactiveColor\": \"#aaa\",\n            \"pageIconSize\": 15,\n            \"animationDurationUpdate\": 800,\n            \"selector\": false,\n            \"selectorPosition\": \"auto\",\n            \"selectorItemGap\": 7,\n            \"selectorButtonGap\": 10\n        }\n    ],\n    \"tooltip\": {\n        \"show\": true,\n        \"trigger\": \"item\",\n        \"triggerOn\": \"mousemove|click\",\n        \"axisPointer\": {\n            \"type\": \"line\"\n        },\n        \"showContent\": true,\n        \"alwaysShowContent\": false,\n        \"showDelay\": 0,\n        \"hideDelay\": 100,\n        \"enterable\": false,\n        \"confine\": false,\n        \"appendToBody\": false,\n        \"transitionDuration\": 0.4,\n        \"textStyle\": {\n            \"fontSize\": 14\n        },\n        \"borderWidth\": 0,\n        \"padding\": 5,\n        \"order\": \"seriesAsc\"\n    },\n    \"title\": [\n        {\n            \"show\": true,\n            \"text\": \"Map-\\u6df1\\u5733-\\u4ea7\\u54c1\\u7ecf\\u7406\",\n            \"target\": \"blank\",\n            \"subtarget\": \"blank\",\n            \"padding\": 5,\n            \"itemGap\": 10,\n            \"textAlign\": \"auto\",\n            \"textVerticalAlign\": \"auto\",\n            \"triggerEvent\": false\n        }\n    ],\n    \"visualMap\": {\n        \"show\": true,\n        \"type\": \"continuous\",\n        \"min\": 0,\n        \"max\": 100,\n        \"inRange\": {\n            \"color\": [\n                \"#50a3ba\",\n                \"#eac763\",\n                \"#d94e5d\"\n            ]\n        },\n        \"calculable\": true,\n        \"inverse\": false,\n        \"splitNumber\": 5,\n        \"hoverLink\": true,\n        \"orient\": \"vertical\",\n        \"padding\": 5,\n        \"showLabel\": true,\n        \"itemWidth\": 20,\n        \"itemHeight\": 140,\n        \"borderWidth\": 0\n    }\n};\n                chart_a21d699e7399430189675f32af5698f9.setOption(option_a21d699e7399430189675f32af5698f9);\n        });\n    </script>\n"
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Map\n",
    "from pyecharts.faker import Faker\n",
    "\n",
    "c = (\n",
    "    Map()\n",
    "    .add(\"产品经理地区分布\", [list(z) for z in zip([i.split('-')[1] for i in dq_name],series_dq[dq_name].values.tolist())], \"深圳\")\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"Map-深圳-产品经理\"), visualmap_opts=opts.VisualMapOpts()\n",
    "    )\n",
    "    \n",
    ")\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "outputs": [
    {
     "data": {
      "text/plain": "'E:\\\\web_crawler_2023-2024-01\\\\week09\\\\render.html'"
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts.charts import Bar\n",
    "\n",
    "bar = Bar()\n",
    "bar.add_xaxis([\"衬衫\", \"羊毛衫\", \"雪纺衫\", \"裤子\", \"高跟鞋\", \"袜子\"])\n",
    "bar.add_yaxis(\"商家A\", [5, 20, 36, 10, 75, 90])\n",
    "bar.render()"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
